<!--
 * @Description: 
 * @Author: william
 * @Date: 2025-07-09 11:46:09
 * @LastEditors: william
 * @LastEditTime: 2025-07-09 13:40:21
-->
<template>
  <CustomModal
    title="注意"
    v-model="visible"
    isTabbar
    :showCancelButton="false"
    confirmText="确定"
    @close="modelClose"
    @confirm="modelConfirm"
  >
    <view class="modal-content">
      <view v-if="props.type === '0'" class="container">
        <view class="content-text">是否修改用户角色?</view>
      </view>
      <view v-if="props.type === '1'" class="container">
        <view class="content-text">是否删除用户?</view>
      </view>
    </view>
  </CustomModal>
</template>

<script setup>
const props = defineProps({
  type: {
    type: String,
    default: '0' // 0-修改用户角色 1-删除用户
  }
})

const visible = defineModel({
  type: Boolean,
  default: false
})
const emit = defineEmits(['close', 'update'])

onMounted(_ => {
  //
})

const modelClose = _ => {
  visible.value = false
  emit('close')
}
const modelConfirm = _ => {
  visible.value = false
  emit('update')
}
</script>

<style lang="scss" scoped>
.modal-content {
  margin: 62 * 2rpx 0 40 * 2rpx;
}

.container {
  display: flex;
  flex-direction: column;
  padding: 0 26rpx;

  .content-text {
    line-height: 26rpx;
    text-align: center;
    font-size: 26rpx;
    font-weight: 400;
    color: var(--color-333);
  }
}
</style>
